// 过滤
function filter <T>( arr:T[], callback:any ):void{

    arr.forEach((item) =>{
        callback(item);
    })
    
}


interface get_name{
    ():string
}

function call ( callback:get_name ):void{

    console.log(callback())
    
}


function number_to_boolean (arr:number[], callback:any):boolean[]{
    
    let cache:boolean[] = [];
    
    arr.forEach(num =>{
        cache.push(callback(num))
    })

    return cache
    
}

export {
    
    filter,
    call,
    number_to_boolean
    
}
